#ifndef __RING_BUFFER_H__
#define __RING_BUFFER_H__

struct ringbuffer;

struct ringbuffer* ringbuffer_create(int element_size, uint8_t* element_array, int element_array_size);
void ringbuffer_destroy(struct ringbuffer*);
int ringbuffer_size(struct ringbuffer*);
int ringbuffer_count(struct ringbuffer*);
int ringbuffer_empty(struct ringbuffer*);
int ringbuffer_full(struct ringbuffer*);
void* ringbuffer_read(struct ringbuffer* p);
void ringbuffer_write(struct ringbuffer* p, void* element, void (*cpf)(void* dest, void* src));

#endif

